<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    .box {
      width: 100px;
      height: 100px;
      margin: 200px auto;
      background: pink;
      transition: all 3s;
    }
    .box:hover {
      /* background: skyblue; */
      transform: scale(1.3);

      /* animation: heartbeat 1s infinite; */
    }
    @keyframes heartbeat {
      0% {
        transform: scale(1);
      }
      15% {
        transform: scale(1.3);
      }
      30% {
        transform: scale(1);
      }
      42% {
        transform: scale(1.3);
      }
      75% {
        transform: scale(1);
      }
    }
  </style>
  <body>
    <div class="box"></div>
  </body>
</html>
